#include "sudokucellsignals.h"
#include "ninesquaregrid.h"

namespace sudoku_ui
{

    SudokuCellSignals SudokuCellSignals::g_instance;
    SudokuCellSignals::SudokuCellSignals(QObject *parent)
        : QObject{parent}
    {}

    SudokuCellSignals::~SudokuCellSignals()
    {

    }

    SudokuCellSignals *SudokuCellSignals::globalInstance()
    {
        return &SudokuCellSignals::g_instance;
    }

    void SudokuCellSignals::selectedSudokuCell(SudokuCell *cell)
    {
        emit g_instance.selectedCell(cell);
    }

    void SudokuCellSignals::selectedNineSquareGrid(NineSquareGrid *grid)
    {
        emit g_instance.selectedNineGrid(grid);
    }

    void SudokuCellSignals::checkGame()
    {
        emit g_instance.check();
    }

    void SudokuCellSignals::checkGame(int row, int col, int num)
    {
        emit g_instance.checkNum(row, col, num);
    }

    void SudokuCellSignals::removeSudokuCell(int num, SudokuCell *cell)
    {
        emit g_instance.removeCell(num, cell);
    }

    void SudokuCellSignals::appendSudokuCell(int num, SudokuCell *cell)
    {
        emit g_instance.appendCell(num, cell);
    }


}


